package com.songxh.core.page;

import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 分页
 * @author songxh
 * @create 2022-12-19-13:48
 */
public class PageData<E> implements Serializable {
    private static final long serialVersionUID = -420381593940013972L;

    private int page = 1;

    private int pageSize = 10;

    private int total;

    private String orderBy;

    private List<E> result;

    private boolean isPage = true;

    private Map<String, Object> params = new HashMap<String, Object>();

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }


    public String getOrderBy() {
        return orderBy;
    }


    public void setOrderBy(String orderBy) {
        this.orderBy = orderBy;
    }


    public List<E> getResult() {
        return result;
    }


    public void setResult(List<E> result) {
        this.result = result;
    }


    public int getPage() {
        return page;
    }


    public void setPage(int page) {
        this.page = page;
    }


    public int getPageSize() {
        return pageSize;
    }


    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }


    public boolean isPage() {
        return isPage;
    }


    public void setIsPage(boolean isPage) {
        this.isPage = isPage;
    }


    public Map<String, Object> getParams() {
        return params;
    }


    public void setParams(Map<String, Object> params) {
        this.params = params;
    }

    @Override
    public String toString() {
        return "PageData [pageNum=" + page + ", pageSize=" + pageSize + ", total=" + total + ", orderBy=" + orderBy
                + ", result=" + result + ", isPage=" + isPage + ", params=" + params + "]";
    }
}
